package Charpter07_file;
import java.io.*;
import java.sql.SQLOutput;


//文件内容的读取

public class Example01 {
    public static void main(String[] args)
    throws IOException{
        FileInputStream  in = new FileInputStream("H:\\test.txt");
        BufferedInputStream  str  = new BufferedInputStream(in);
        BufferedInputStream str2 = new BufferedInputStream(System.in);
        byte ch[] = new byte[1024];      //必须为比特流
        byte ch1[] = new byte[1024];
        int a = str.read(ch);
        String  b = new String(ch ,0,a);
        System.out.println("文本内容为:   " + b);
        str.close();
        int length  = str2.read(ch1);
        String  c = new String(ch1,0,length);
        System.out.println("刷入的内容:   "+ c);
        str2.close();



    }
}
